package com.simple.create.factory.sample5;

/**
 * 生产金额券的工厂
 *
 * @author simple
 * @version 1.0
 * @date 2018/12/5 09:41
 * @since 1.0
 */
public class AmountCouponFactory implements CouponFactory {
    @Override
    public String createCouponName() {
        return "20元代金券";
    }

    @Override
    public String createDesc() {
        return "价值20元的代金券一张";
    }

    @Override
    public CouponType createType() {
        return CouponType.AMOUNT;
    }

    @Override
    public Channel createChannel() {
        return new WebChannel();
    }

    @Override
    public String create() {
        return this.toString();
    }

    @Override
    public String toString() {
        return "\n------------\n券类型: " + this.createType().getMsg() + "\n" +
                "券名称: " + this.createCouponName() + "\n" +
                "券描述: " + this.createDesc() + "\n\n" +
                "渠道: " + this.createChannel().getChannelDesc() + "\n------------\n";

    }
}
